function  three 
 
    global b d p g Rf OA         %%% 常数         
    global Bo II u ii            %%% 时间向量，方位角向量     
    global H W h Ds Dm Os Om     %%% 参数向量          
    global PointSet_three_Bo_u   %%% 三相线点集 
    global PointSet_down_Bo_u_O  %%% 气液面下部点集    
    global PointSet_up_Bo_u_O    %%% 气液面上部点集        
    %%% 特殊 全局变量
    global Point_r_three_Bo_u  Point_z_three_Bo_u  a_down_Bo_u    
    
    K_three_u=tan(u);           % 只在本函数中使用的系数 K_three_u

for N=1:II %%% 时间为Bo时点三相接触线。
 
    if N~=1                     % 只在本函数中使用的系数 Rm
        Rm=((W(1,N)/2).^2+h(1,N).^2) / (2*h(1,N)) ;
    else
        Rm=0;
    end
    
    for n=1:ii  %%% 方位角为u时，三相点坐标
        A=(K_three_u(1,n).^2)*Rf+Rm-h(1,N);% 只在本函数中使用的系数 A
        
      % 时间为Bo，方位角为u时三相点的z坐标  Point_z_three_Bo_u  
      if u(1,n) == pi/2
          Point_z_three_Bo_u(N,n)=0;
    
        elseif u(1,n) ~= pi/4
          Point_z_three_Bo_u(N,n)=(-A+sqrt(A.^2-(1-K_three_u(1,n).^2)*...,
                               (h(1,N).^2-2*Rm*h(1,N))))/(1-K_three_u(1,n).^2);
 
        else 
          Point_z_three_Bo_u(N,n)=(Rm.^2-(Rm-h(1,N)).^2)/(2*(Rf+Rm-h(1,N)));
      end
      % 时间为Bo，方位角为u时三相点的r坐标  Point_r_three_Bo_u
      if u(1,n) ~= pi/2
            Point_r_three_Bo_u(N,n)=sqrt(Rf.^2-(Point_z_three_Bo_u(N,n)-Rf).^2) / cos(u(1,n));
    
        else 
            Point_r_three_Bo_u(N,n)=W(1,N)/2;
        end
      % 时间为Bo，方位角为u时三相点的x,y坐标  Point_x_three_Bo_u
        Point_x_three_Bo_u(N,n)=Point_r_three_Bo_u(N,n) * cos(u(1,n));
        Point_y_three_Bo_u(N,n)=Point_r_three_Bo_u(N,n) * sin(u(1,n));
    end
    PointSet_three_Bo_u(N,:)=[Point_x_three_Bo_u(N,:),Point_y_three_Bo_u(N,:),Point_z_three_Bo_u(N,:)];
 end
end
